const path = require('path');
const fs = require('fs');
module.exports = app => {
	const exports = {};

	exports.siteFile = {
		'/favicon.ico': fs.readFileSync(path.join(app.baseDir, 'app/web/asset/images/favicon.ico')),
		'/MP_verify_TxDW4N2mt2ODaSZF.txt': fs.readFileSync(path.join(app.baseDir, 'app/web/asset/MP_verify_TxDW4N2mt2ODaSZF.txt')),
	};

	exports.view = {
		cache: false,
	};

	exports.vuessr = {
		layout: path.join(app.baseDir, 'app/web/view/layout.html'),
		injectRes: [
			// {
			//  inline: true,
			//  url: path.join(app.baseDir, 'app/web/framework/inject/inline.js')
			// },
			// {
			//  inline: true,
			//  manifest: true,
			//  url: 'pack/inline.js'
			// }
		],
	};

	exports.logger = {
		consoleLevel: 'DEBUG',
		dir: path.join(app.baseDir, 'logs'),
	};

	exports.static = {
		prefix: '/public/',
		dir: path.join(app.baseDir, 'public'),
	};

	exports.keys = '123456';

	exports.middleware = [
		'access',
	];

	exports.security = {
		csrf: {
			enable: false,
		},
	};

	return exports;
};
